package com.ruoyi.framework.config;

import com.ruoyi.system.config.WebSocketServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class WebSocketConfig {
    private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        log.info("websocket初始化啊");
        ServerEndpointExporter exporter = new ServerEndpointExporter();

        // 手动注册 WebSocket 端点
       // exporter.setAnnotatedEndpointClasses(WebSocketServer.class);

        return exporter;
    }
}
